/*
 * @Author: TJN tjn@246@126.com
 * @Date: 2024-07-16 16:19:11
 * @LastEditors: TJN tjn@246@126.com
 * @LastEditTime: 2024-07-17 11:13:49
 * @FilePath: \router\mock\user.ts
 * @Description:
 *
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
 */
import { MockMethod } from "vite-plugin-mock";
import Mock from 'mockjs'

const Random = Mock.Random

export default [
  {
    url: "/api/get",
    method: "get",
    response: () => {
      return {
        code: 0,
        data: {
          name: "TJN",
        },
      };
    },
  },

  {
    url: "/api/login",
    method: "post",
    response: () => {
      return {
        code: 0,
        data: {
          token: Random.string(10),
        },
      };
    },
  },
] as MockMethod[];
